<?
session_start();
echo "<pre>";
$ss = $_COOKIE['SAMSsession'];

	$sid = $_COOKIE['HS7BDF'];

	$name =substr($sid,0,strpos($sid,"\\"));

	$temp = substr($ss,40);

	$temp1=explode(".",$temp);

	$temp1=array_unique($temp1);

	$oucu=$temp1[0];

	$ssid=$temp1[1];

	$isstudent='false';

	if($_SERVER['HTTP_SAMS_STUDENTPI'])$isstudent=true;

	if (!$ssid) $ssid=$temp1[2];
	$_SESSION['oucu']= $_SERVER['HTTP_SAMS_USER'];
	$_SESSION['ssid']=$_SERVER['HTTP_SAMS_STAFFID'];
	$_SESSION['spi']=$_SERVER['HTTP_SAMS_STUDENTPI'];
	$_SESSION['stid']=$_SERVER['HTTP_SAMS_TUTORID'];
	$_SESSION['svid']=$_SERVER['HTTP_SAMS_VISITORID'];
	$_SESSION['sname']=$_COOKIE['HS7BDF'];
	$_SESSION['isstudent'] =$isstudent;
	$_SESSION['samstimecheck']=mktime();
echo "<pre>";
echo $_COOKIE['HS7BDF'];;
//print_r($_SESSION);
echo "<br>";
print($_SERVER['AUTH_TYPE']);
//header("location:".($_GET['url'])."?sams=".$_SESSION['samstimecheck']."&url=".$_GET['url']);
print_r($_SERVER);
?>
